Using local and global resources

All resources are global by default when you import or create them. You can use them by setting node resource property values, such as textures, materials, and so on. After selecting a node in the Project, you can see all resources of that node in the Context Resources window.

You can make resources local to any node. By adding a resource to a scope of a node you add a resource ID entry to the resource dictionary of that object. A resource ID is an identifier that abstracts a resource from where it is used. A resource dictionary is a collection of resource IDs pointing to resources. By default resource dictionaries are present in the root nodes of all prefabs but you can add a resource to any node. A node can access all resource IDs in its own resource dictionary and in resource dictionaries defined in its ascendant nodes. You can assign resource IDs as values for resource properties and they are shown in Kanzi Studio with the syntax RscID → Resource.

Adding a resource to the resource dictionary of a node

To add a resource to the resource dictionary of a node:

  1. If you do not have the Context Resources window open, select Window > Context Resources.
  2. In the Project press Alt and right-click the node to which you want to add a resource and select Resource Dictionary.
  3. In the Context Resources click:

See also

Using external resource dictionaries

Preloading resource dictionaries

Loading resources in parallel

Resources

Resource management